import {
	createApp
} from 'vue'
import App from './App.vue'
import router from './router/router.js'
import api from './http/api.js'
// 全局变量存储
import store from './store/store.js'
// vant 移动端 UI 框架
// 1. 引入需要的组件
import {
	Button
} from 'vant'
import { Image as VanImage } from 'vant'
import { Field } from 'vant'
import { Popup } from 'vant'
import { Icon } from 'vant'
import {
	Cell,
	CellGroup
} from 'vant'
import {
	Col,
	Row
} from 'vant'
import {
	showToast,
	showLoadingToast,
	showSuccessToast,
	showFailToast
} from 'vant'
import { Popover } from 'vant'
import {
	NavBar
} from 'vant'
import {
	Tabbar,
	TabbarItem
} from 'vant'
import { Swipe, SwipeItem } from 'vant'
import { Tab, Tabs } from 'vant'
import { List } from 'vant'
import { Picker } from 'vant'
import { DatePicker } from 'vant'
import { Uploader } from 'vant'
import { Divider } from 'vant'
// 2. 引入组件样式
import 'vant/lib/index.css'
// 自己的全局样式
import './assets/css/global.css'

// 自己到全局 JS
import strHelper from './assets/js/utilsstr.js'

// vue app 实例
const app = createApp(App)
// 网络
app.config.globalProperties.$http = api
// 字符串工具
app.config.globalProperties.$strHelper = strHelper
// 路由
app.use(router)
// 全局变量
app.use(store)
// Vant 使用 组件
app.use(Button)
app.use(Field)
app.use(Icon)
app.use(VanImage)
app.use(CellGroup)
app.use(Cell)
app.use(Col)
app.use(Row)
app.use(NavBar)
app.use(Popup)
app.use(Popover)
app.use(Tabbar)
app.use(TabbarItem)
app.use(Swipe)
app.use(SwipeItem)
app.use(List)
app.use(Tab)
app.use(Tabs)

app.use(Picker)
app.use(DatePicker)
app.use(Uploader)

app.use(Divider)

// 挂载到 app
app.mount('#app')

